# 7. 删除数据
import sqlite3

from mysql.create_db import cursor, conn

try:
    cursor.execute("DELETE FROM users WHERE name = ?", ("Bob",))
    conn.commit()
    print("数据删除成功")
except sqlite3.Error as e:
    print(f"删除失败：{e}")
    conn.rollback()